package com.peanut.youfupay.service.util;


import com.peanut.youfupay.entity.request.UpdateOrderStatusModle;
import com.peanut.youfupay.entity.response.ResponseMessage;
import com.peanut.youfupay.enums.FunCodeEnum;
import com.peanut.youfupay.service.BaseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * 商户自助修改订单状态
 *
 * @author peanut
 */
@Slf4j
@Service("updateOrderStatusService")
public class UpdateOrderStatusService extends BaseService {

    /**
     * @param funCodeEnum
     * @param updateOrderStatusModle
     * @return
     * @throws Exception
     */
    public String doBusiness(FunCodeEnum funCodeEnum, UpdateOrderStatusModle updateOrderStatusModle) {
        log.info("自助修改订单状态开始:{}，{}", funCodeEnum, updateOrderStatusModle);
        ResponseMessage responseMessage = applyYouFuByHttpPost(funCodeEnum, updateOrderStatusModle);
//        UpdateOrderStatusModle updateOrderStatusModle = JSON.parseObject(responseMessage.getResData(), UpdateOrderStatusModle.class);
        log.info("自助修改订单状态结束:{}", responseMessage.getResMsg());
        return responseMessage.getResMsg();
    }
}

